//配置路由规则
import VueRouter from 'vue-router'
//引入组件
import firstPage from '../pages/firstPage'
import secondPage from '../pages/secondPage'
import CommodityList from '../pages/CommodityList'

//创建并暴露一个路由器
export default new VueRouter({
    routes: [
        {
            path: '/',
            component: firstPage,
        },
        {
            path: '/firstPage',
            component: firstPage,
        },
        {
            path: '/secondPage',
            component: secondPage,
        },
        {
            name: 'CommodityList',
            path: '/CommodityList',
            component: CommodityList,
            props: true,
        },
    ]
})